package com.offcn.service;

import com.offcn.dao.CourseDao;
import com.offcn.dao.CourseDetailDao;
import com.offcn.entity.CourseDetail;

/**
 * @author xyll1
 */
public class CourseDetailService {
    CourseDetailDao courseDetailDaoDao = new CourseDetailDao();
    public boolean addCourseDetail(CourseDetail courseDetail) {
        switch (courseDetail.getType()){
            case "1":courseDetail.setType("第一章");break;
            case "2":courseDetail.setType("第二章");break;
            case "3":courseDetail.setType("第三章");break;
            default:break;
        }
        System.out.println(courseDetail.getStar_date());
        return courseDetailDaoDao.addCourseDetail(courseDetail) > 0;
    }
}
